/**
 * 
 */
package com.fashop.mapper;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.fashop.bean.local.LocalOut;
import com.fashop.jpa.Local;

/**
 * @author Alan Dávila
 * e-mail ustargab@gmail.com
 * date 14/01/2014 23:20:28
 */
@Component("listadoLocalMapperOut")
public class ListadoLocalMapperOut implements GenericMapper<List<Local>, List<LocalOut>> {

	@Resource(name = "localMapperOut")
	private GenericMapper<Local, LocalOut> localMapperOut;
	/* (non-Javadoc)
	 * @see com.fashop.mapper.GenericMapper#map(java.lang.Object)
	 */
	public List<LocalOut> map(final List<Local> entrada) {
		List<LocalOut> salida = null;
		if (entrada != null) {
			salida = new ArrayList<LocalOut>();
			for (Local local : entrada) {
				salida.add(localMapperOut.map(local));
			}
		}
		return salida;
	}

}
